@extends('layout.adminindex')
<script type="text/javascript" charset="utf-8" src="/edit/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/edit/ueditor.all.min.js"> </script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="/edit/lang/zh-cn/zh-cn.js"></script>

@section('con')
<div class="mws-panel grid_8">
	<div class="mws-panel-header">
    	<span>添加文章</span>
    </div>
    <div class="mws-panel-body no-padding">
    	<form class="mws-form" method='post' action="/admin/article/inster" enctype='multipart/form-data'>
    			{{csrf_field()}}
    		   <div class="mws-form-inline">
    			<div class="mws-form-row">
    				<label class="mws-form-label" >文章类别</label>
    				<div class="mws-form-item">
    				<select name="cate_id" class='small' id="">
                        @foreach($list as $v)
                        <option value="{{$v['id']}}">{{$v['name']}}</option> 
                        @endforeach           
                    </select>
    				</div>
    			</div>
    			<div class="mws-form-row">
    				<label class="mws-form-label">文章标题</label>
    			<div class="mws-form-item">
    					<input class="small" type="text" name='title'>
    				</div>
    			</div>
    			<div class="mws-form-row">
    				<label class="mws-form-label">文章描述</label>
    				<div class="mws-form-item">
    					<input class="small" type="text" name='descr' >
    				</div>
    			</div>
    			<div class="mws-form-row">
    				<label class="mws-form-label">文章图片</label>
    				<div class="mws-form-item">
    					<input class="small" type="file" name='pic'>
    				</div>
    			</div>

                <div class="mws-form-row">
                    <label class="mws-form-label">文章内容</label>
                    <div class="mws-form-item">
                        <script id="editor" type="text/plain" style="width:700px;height:300px;"></script>
                    </div>
                </div>
    		</div>
    		<div class="mws-button-row">
    			<input value="添加" class="btn btn-danger" type="submit">
    			<input value="重置" class="btn " type="reset">
    		</div>
    	</form>
    </div>    	
</div>
<script type="text/javascript">
        //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var ue = UE.getEditor('editor');
</script>
@endsection
